<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('receive/index')}">申请列表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('receive/index')}">
        <input class="form-control" type="text" name="keyword" style="" value="{:input('keyword', '')}" placeholder="单号">
        <select name="status" id="" class="form-control">
            <option value="-1">全部</option>
            <option value="0" {:input('status', -1) == 0?'selected':''}>未处理</option>
            <option value="1" {:input('status', -1) == 1?'selected':''}>已处理</option>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索">
        <a class="btn btn-danger" href="{:url('receive/index?order_status=-1')}">清空</a>
    </form>
    <div class="row">
        <table class="table table-hover table-bordered table-striped table-condensed">
            <thead>
            <tr>
                <th>ID</th>
                <th>用户</th>
                <th>手机</th>
                <th>邮箱</th>
                <th>单号</th>
                <th>个数</th>
                <th>订单状态</th>
                <th>时间</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo['nickname']}</td>
                    <td>{$vo.phone}</td>
                    <td>{$vo.email}</td>
                    <td>{$vo.order_nos}</td>
                    <td>{$vo.order_no_num}</td>
                    <td>{$vo.status?'已处理':'未处理'}</td>
                    <td>
                        申请：{:date('Y-m-d H:i:s',$vo['add_time'])}<br>
                        处理：{$vo.handle_time ? date('Y-m-d H:i',$vo['handle_time']) : '-'}<br>
                    </td>
                    <td>
                        <switch $vo.status>
                            <case 1>
                                <a class="btn btn-sm btn-info" href="javascript:openIframeLayer('see?id={$vo.id}', '查看处理', {area: ['60%', '60%']})">查看</a>
                            </case>
                            <case 0>
                                <a class="btn btn-sm btn-info" href="javascript:openIframeDialog('handle?id={$vo.id}','后台处理', {'width':'60%','height':'60%'})">处理</a>
                            </case>
                        </switch>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('receive/del',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$list->render()}</div>
    </div>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
    $(function () {

    })
</script>
</body>
</html>